package com.gridmobi.xrtb.model.openrtb24;

public class Banner {

	public Banner() {
	}
	private int w;
	private int h;
	private Format[] format;
	private int wmax;
	private int hmax;
	private int wmin;
	private int hmin;
	private String id;
	private int[] btype;
	private int[] battr;
	private int pos;
	private String[] mimes;
	private int topframe;
	private int[] expdir;
	private int[] api;
	private Object ext;
	/**
	 * @return the w
	 */
	public int getW() {
		return w;
	}
	/**
	 * @param w the w to set
	 */
	public void setW(int w) {
		this.w = w;
	}
	/**
	 * @return the h
	 */
	public int getH() {
		return h;
	}
	/**
	 * @param h the h to set
	 */
	public void setH(int h) {
		this.h = h;
	}
	/**
	 * @return the wmax
	 */
	public int getWmax() {
		return wmax;
	}
	/**
	 * @param wmax the wmax to set
	 */
	public void setWmax(int wmax) {
		this.wmax = wmax;
	}
	/**
	 * @return the hmax
	 */
	public int getHmax() {
		return hmax;
	}
	/**
	 * @param hmax the hmax to set
	 */
	public void setHmax(int hmax) {
		this.hmax = hmax;
	}
	/**
	 * @return the wmin
	 */
	public int getWmin() {
		return wmin;
	}
	/**
	 * @param wmin the wmin to set
	 */
	public void setWmin(int wmin) {
		this.wmin = wmin;
	}
	/**
	 * @return the hmin
	 */
	public int getHmin() {
		return hmin;
	}
	/**
	 * @param hmin the hmin to set
	 */
	public void setHmin(int hmin) {
		this.hmin = hmin;
	}
	/**
	 * @return the id
	 */
	public String getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(String id) {
		this.id = id;
	}
	/**
	 * @return the format
	 */
	public Format[] getFormat() {
		return format;
	}
	/**
	 * @param format the format to set
	 */
	public void setFormat(Format[] format) {
		this.format = format;
	}
	/**
	 * @return the btype
	 */
	public int[] getBtype() {
		return btype;
	}
	/**
	 * @param btype the btype to set
	 */
	public void setBtype(int[] btype) {
		this.btype = btype;
	}
	/**
	 * @return the battr
	 */
	public int[] getBattr() {
		return battr;
	}
	/**
	 * @param battr the battr to set
	 */
	public void setBattr(int[] battr) {
		this.battr = battr;
	}
	/**
	 * @return the pos
	 */
	public int getPos() {
		return pos;
	}
	/**
	 * @param pos the pos to set
	 */
	public void setPos(int pos) {
		this.pos = pos;
	}
	/**
	 * @return the mimes
	 */
	public String[] getMimes() {
		return mimes;
	}
	/**
	 * @param mimes the mimes to set
	 */
	public void setMimes(String[] mimes) {
		this.mimes = mimes;
	}
	/**
	 * @return the topframe
	 */
	public int getTopframe() {
		return topframe;
	}
	/**
	 * @param topframe the topframe to set
	 */
	public void setTopframe(int topframe) {
		this.topframe = topframe;
	}
	/**
	 * @return the expdir
	 */
	public int[] getExpdir() {
		return expdir;
	}
	/**
	 * @param expdir the expdir to set
	 */
	public void setExpdir(int[] expdir) {
		this.expdir = expdir;
	}
	/**
	 * @return the api
	 */
	public int[] getApi() {
		return api;
	}
	/**
	 * @param api the api to set
	 */
	public void setApi(int[] api) {
		this.api = api;
	}
	/**
	 * @return the ext
	 */
	public Object getExt() {
		return ext;
	}
	/**
	 * @param ext the ext to set
	 */
	public void setExt(Object ext) {
		this.ext = ext;
	}
	@Override
	public String toString(){
		StringBuffer sb = new StringBuffer();
		if ( this.getWmax() > 0 && this.getWmin() > 0
				&& this.getHmax() > 0 && this.getHmin() > 0
				) {
			sb.append("hm:").append(this.getHmin());
			sb.append("hx:").append(this.getHmax());
			sb.append("wm:").append(this.getWmin());
			sb.append("wx:").append(this.getWmax());
			} else if (this.getW() > 0 && this.getH() > 0) {
					sb.append("h:").append(this.getH());
					sb.append("w:").append(this.getW());
			}
		return sb.toString();
	}
}
